<template>
    <div class="goodsdes-container">
        <p class="title">{{ goodsdes.title }}</p>
        <hr>
        <div class="content" v-html="goodsdes.content"></div>
    </div>
</template>

<script>
export default {
    data(){
        return {
            id: this.$route.params.id,
            goodsdes: {}
        }
    },
    created(){
        this.getGoodsDes()
    },
    methods: {
        getGoodsDes(){
            this.$http.get('api/goods/getdesc/' + this.id).then(result => {
                if(result.body.status === 0){
                    this.goodsdes = result.body.message[0]
                }
            })
        }
    }
}
</script>

<style lang="scss">
.goodsdes-container{
  padding: 4px;
  .title{
    font-size: 16px;
    color: #226aff;
    text-align: center;
    margin: 15px 0;
  }
  .content{
    img{
      width: 100%;
    }
  }
}
</style>